import axios from 'axios'
let API
if (process.env.NODE_ENV === 'development') {
  API = 'http://192.168.23.76:3000/'
} else {
  API = 'http://106.14.88.16:80/'
}

export const createLeaveMessage = (content) => {
  return new Promise(resolve => {
    axios.post(API + 'myResume/createLeaveMessage', { content }).then(res => {
      resolve()
    })
  })
}

export const findAllMessage = (content) => {
  return new Promise(resolve => {
    axios.get(API + 'myResume/findAllMessage', { content }).then(res => {
      resolve(res.data)
    })
  })
}
